#pragma once 

using namespace System;

namespace Adaptive
{
	namespace Foundation
	{
		public delegate void ProgressEventHandler (Object^ sender, ProgressEventArgs^ e);
		public delegate void ProgressStatusEventHandler (Object^ sender, ProgressStatusEventArgs^ e);
		public delegate void ExceptionEventHandler(Object^ sender, ExceptionEventArgs^ e);

		generic<typename T>	public delegate void UserDataEventHandler (Object^ sender, UserDataEventArgs<T>^ e);		

		namespace IO
		{
			public delegate void IoLoadFailedEventHandler (Object^ sender, IoLoadFailedEventArgs^ e);
			public delegate void IoSaveFailedEventHandler (Object^ sender, IoSaveFailedEventArgs^ e);
		}
		namespace Security
		{
			public delegate void AuthenticationRequiredEventHandler( Object^ sender, AuthenticationRequiredEventArgs^ e);
		}
	}
	namespace Network
	{
		namespace Sockets
		{
			public delegate void AcceptedSocketEventHandler (Object^ sender, AcceptedSocketEventArgs^ e);
			public delegate void ConnectionEventHandler (Object^ sender, ConnectionEventArgs^ e);
			public delegate void ConnectionRequestEventHandler (Object^ sender, ConnectionRequestEventArgs^ e);
			public delegate void DataReceivedEventHandler (Object^ sender, DataReceivedEventArgs^ e);
			public delegate void DataSentEventHandler (Object^ sender, DataSentEventArgs^ e);
			public delegate void SocketConnectedEventHandler (Object^ sender, SocketConnectedEventArgs^ e);
			public delegate void SocketDisconnectedEventHandler (Object^ sender, SocketDisconnectedEventArgs^ e);
			public delegate void SocketErrorEventHandler (Object^ sender, SocketErrorEventArgs^ e );
		}
	}
}
